import { createRouter, createWebHistory } from 'vue-router'
import ToDoList from '../components/ToDoList.vue'
import Login from '../components/Login.vue'

const routes = [
    {
        path: '/',
        name: 'Home',
        component: ToDoList
    },
    {
        path: '/app',
        name: 'ToDoList', // 确保名称正确
        component: ToDoList
    },
    {
        path: '/login',
        name: 'Login',
        component: Login
    }
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router